<template>
  <div class="goal-rank">
    <div class="goal-table">
      <el-table
              v-loading="loading"
              element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.8)"
              :data="leftData"
              style="width: 600px"
              :row-style='tableRowStyle'
              :cell-style="goalCellStyle"
              :header-cell-style="tableHeaderColor">
        <el-table-column
                prop="rank"
                label="射门"
                width="80">
        </el-table-column>
        <el-table-column
                prop="name"
                label=""
                width="150">
          <template slot-scope="scope">
            <div class="team-name">
              <img class="player-logo" :src="scope.row.teamImg" alt="">
              <span class="team-name-text myColumn" @click="enterTeam(scope.row.teamId)">{{scope.row.name}}</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column
                prop="total"
                label="总计"
                width="85">
        </el-table-column>
        <el-table-column
                prop="goals"
                label="进球"
                width="85">
        </el-table-column>
        <el-table-column
                prop="rate"
                label="成功率(%)"
                width="115">
        </el-table-column>
        <el-table-column
                prop="xG"
                label="xG"
                width="85">
        </el-table-column>
      </el-table>
    </div>
    <div class="shoot-table">
      <el-table
              v-loading="loading"
              element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.8)"
              :data="rightData"
              style="width: 600px"
              :row-style='tableRowStyle'
              :cell-style="shootCellStyle"
              :header-cell-style="tableHeaderColor">
        <el-table-column
                prop="rank"
                label="助攻"
                width="80">
        </el-table-column>
        <el-table-column
                prop="name"
                label=""
                width="150">
          <template slot-scope="scope">
            <div class="team-name">
              <img class="player-logo" :src="scope.row.teamImg" alt="">
              <span class="team-name-text myColumn" @click="enterTeam(scope.row.teamId)">{{scope.row.name}}</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column
                prop="total"
                label="总计"
                width="185">
        </el-table-column>
        <el-table-column
                prop="xA"
                label="xA"
                width="185">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
  import teamRank from "../../../../mixin/teamRank";
  export default {
    name: "GoalRank",
    mixins:[teamRank],
    data(){
      return {
        type:'offense'
      }
    },
  }
</script>

<style scoped>
  .goal-rank {
    width: 85%;
    /*height: 80%;*/
    margin: 60px auto 0;
    display: flex;
    justify-content: space-between;
    /*background-color: red;*/
  }
  .team-name {
      text-align: left;
    }
  .team-name > span {
    margin-left: 10px;
  }
  .goal-table /deep/ .el-table .cell {
    text-align: center;
    line-height: 30px;
  }
  .shoot-table /deep/ .el-table .cell {
    text-align: center;
    line-height: 30px;
  }
  .team-name {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /*margin-left: 3px;*/
    /*background-color: red;*/
  }
  .player-logo {
    width: 24px;
    height: 24px;
    margin-left: 5px;
  }
  .team-name-text {
    margin-left: 7px;
  }
</style>